{template '_header'}
<div class='page-heading'><h2>通知设置</h2></div>
<div class='alert alert-info'>请将公众平台模板消息所在行业选择为： IT科技/互联网|电子商务</div>
<form {ifp 'creditshop.notice.edit'} action="" method="post" {/if} class="form-horizontal form-validate" enctype="multipart/form-data" >
    <input type='hidden' name='setid' value="{$set['id']}" />
    <input type='hidden' name='op' value="notice" />
    <div class="panel panel-default">
        <div class='panel-heading'>卖家通知</div>
        <div class='panel-body'>
            <div class="form-group">
                <label class="col-sm-2 control-label">商品兑换成功通知</label>
                <div class="col-sm-9 col-xs-12">
                    {ifp 'creditshop.notice.edit'}
                    <input type="text" name="tm[new]" class="form-control" value="{$set['tm']['new']}" />
                    <div class="help-block">通知公众平台模板消息编号: OPENTM205041965  或 OPENTM207024290 </div>
                    {else}
                        <input type="hidden" name="tm[new]" value="{$set['tm']['new']}" />
                        <div class="form-control-static">{$set['tm']['new']}</div>
                    {/if}
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label"></label>
                <div class="col-sm-9 col-xs-12">
                    {ifp 'creditshop.notice.edit'}
                    {php echo tpl_selector('openids',array('key'=>'openid','text'=>'nickname', 'thumb'=>'avatar','multi'=>1,'placeholder'=>'昵称/姓名/手机号','buttontext'=>'选择通知人', 'items'=>$salers,'url'=>webUrl('member/query') ))}
                    <span class='help-block'>商品兑换后商家通知，可以指定多个人，如果不填写则不通知</span>
                    {else}
                    <div class="input-group multi-img-details" id='saler_container'>
                        {loop $salers $saler}
                        <div class="multi-item saler-item" openid='{$saler['openid']}'>
                             <input type="hidden" value="{$saler['openid']}" name="openids[]">
                            <img class="img-responsive img-thumbnail" src='{$saler['avatar']}' onerror="this.src='./resource/images/nopic.jpg'; this.title='图片未找到.'">
                                 <div class='img-nickname'>{$saler['nickname']}</div>
                            <input type="hidden" value="{$saler['openid']}" name="openids[]">
                        </div>
                        {/loop}
                    </div>
                    {/if}
                </div>
            </div>
        </div>
        <div class='panel-heading'>买家通知</div>
        <div class='panel-body'>
             <div class="form-group">
                <label class="col-sm-2 control-label">中奖结果通知</label>
                <div class="col-sm-9 col-xs-12">
                    {ifp 'creditshop.notice.edit'}
                        <input type="text" name="tm[award]" class="form-control" value="{$set['tm']['award']}" />
                        <div class="help-block">公众平台模板消息编号: OPENTM204632492 </div>
                    {else}
                        <input type="hidden" name="tm[award]" value="{$set['tm']['award']}" />
                        <div class="form-control-static">{$set['tm']['award']}</div>
                    {/if}
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">奖品兑换成功通知</label>
                <div class="col-sm-9 col-xs-12">
                    {ifp 'creditshop.notice.edit'}
                        <input type="text" name="tm[exchange]" class="form-control" value="{$set['tm']['exchange']}" />
                        <div class="help-block">公众平台模板消息编号: OPENTM207327376 </div>
                    {else}
                        <input type="hidden" name="tm[exchange]" value="{$set['tm']['exchange']}" />
                        <div class="form-control-static">{$set['tm']['exchange']}</div>
                    {/if}
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">发货提醒</label>
                <div class="col-sm-9 col-xs-12">
                    {ifp 'creditshop.notice.edit'}
                        <input type="text" name="tm[send]" class="form-control" value="{$set['tm']['send']}" />
                        <div class="help-block">公众平台模板消息编号: OPENTM203331384 </div>
                    {else}
                        <input type="hidden" name="tm[send]" value="{$set['tm']['send']}" />
                        <div class="form-control-static">{$set['tm']['send']}</div>
                    {/if}
                </div>
            </div>
            <div class="form-group"></div>
            <div class="form-group">
                <label class="col-sm-2 control-label"></label>
                <div class="col-sm-9 col-xs-12">
                    {ifp 'creditshop.notice.edit'}
                    <input type="submit" value="提交" class="btn btn-primary"  />
                    {/if}
                 </div>
            </div>
        </div>
    </div>
</form>
{template '_footer'}     